package com.mmf.ancientcostume.presenter.imp.goods;

import android.util.Log;

import com.mmf.ancientcostume.activity.CollectListActivity;
import com.mmf.ancientcostume.activity.CommentListActivity;
import com.mmf.ancientcostume.base.presenter.BasePresenter;
import com.mmf.ancientcostume.model.Comment;
import com.mmf.ancientcostume.model.GoodsDetail;
import com.mmf.ancientcostume.service.home.HomeService;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import rx.Subscription;
import rx.functions.Action1;

/**
 * Created by MMF on 2017-08-03.
 */

public class CollectListPresenterImp extends BasePresenter<CollectListActivity> {
    private HomeService mHomeService;
    private List<GoodsDetail> list = new ArrayList<>();

    public CollectListPresenterImp() {
        mHomeService = new HomeService();
    }


    public void getCollectList(final int pageNo, int pageSize, int userId) {
        showLoadingDialog();
        Subscription subscription =
                mHomeService.getCollectList(pageNo,pageSize,userId).subscribe(newSubscriber(new Action1<List<GoodsDetail>>() {
                    @Override
                    public void call(List<GoodsDetail> remindDTOs) {
                        view.onSuccess(remindDTOs);
                    }
                }));
        mCompositeSubscription.add(subscription);
    }

}
